floatrange (parameter type)

A floating point range is specified with type="floatrange" in the parameter definition:

    {name="MyFloatRange", type="floatrange", range={0, 100}, default={10.5, 90.5}}

The range is represented by a slider in the UI, with two handles for adjusting the lower and upper value:

../../../_images/ui-floatrange-parameter.png

The valid value increments can be specified with ui={stepSize=<value>}:

    {name="MySteppedFloatRange", type="floatrange", range={0, 100}, ui={stepSize=0.5}}

The current range is accessed via self.parameters in execute, which provides a Lua array with two Lua number values:

  local myFloatRange = self.parameters.MyFloatRange
  local lowerFloat = myFloatRange[1]
  local upperFloat = myFloatRange[2]